package com.bafenyi.zh.bafenyilib.activeWindow;

import android.content.Context;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;

import com.bafenyi.zh.bafenyilib.BFYMethod;
import com.bafenyi.zh.bafenyilib.BFYMethodListener;

public class BFYActivityWindowLifeCycle implements LifecycleObserver {


    BFYMethodListener.GetActiveWindowResult activeWindowResult;

    Context context;

    public BFYActivityWindowLifeCycle(Context context , BFYMethodListener.GetActiveWindowResult activeWindowResult) {
        this.activeWindowResult = activeWindowResult;
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    public void onResume(){
        activeWindowResult.onResult(BFYActiveWindow.isShowScoreOrShare());
        BFYMethod.updateParams("");
    }
}
